package com.cloudcc.mobile.dao.impl;

import java.util.List;

import com.cloudcc.cloudframe.net.ResultCallBack;
import com.cloudcc.cloudframe.net.async.BeanRequest;
import com.cloudcc.mobile.dao.BaseEngine;
import com.cloudcc.mobile.dao.ChatterEngine;
import com.cloudcc.mobile.entity.chatter.ChatterEventType;
import com.cloudcc.mobile.manager.RunTimeManager;
import com.cloudcc.mobile.manager.UrlManager;
import com.loopj.android.http.RequestParams;

public class ChatterEngineImpl extends BaseEngine implements ChatterEngine {

	@Override
	public void getChatterEventTypes(
			ResultCallBack<List<ChatterEventType>> listener) {
		RequestParams params = new RequestParams();
		params.put("serviceName", "getPickListValue");
		params.put("data", "{objectApiName:\"Event\",fieldApi:\"type\"}");
		params.put("binding", RunTimeManager.getInstance().getServerBinding());
		BeanRequest<List<ChatterEventType>> request = new BeanRequest<List<ChatterEventType>>() {
		};
		request.setResultListener(listener);
		sendGet(UrlManager.getInterfaceUrl(), params, request);
	}

}
